#pragma  once
#include "../util/Notify.h"


class Size: public SIZE{
public:
	Size(int _cx = 0, int _cy = 0);
};

class Point: public POINT{
public:
	explicit Point(int _x = 0, int _y = 0);
	Point(const POINT& pt);
};

class Rect: public RECT{
public:
	explicit Rect(int _left=0, int _top=0, int _right=0, int _bottom=0);
	Rect(const RECT& r);
	Rect(const RECT* r);
	int Width() const;
	int Height() const;
	bool Empty() const;
	Rect& Inflate(int dx, int dy);
	Rect& Move(int deltaX, int deltaY);
	Rect& Offset(int deltaX, int deltaY);
	bool operator==(const Rect& other) const;

	bool Contains(const Point& pt) const;
	bool Contains(const Rect& rc)  const;
};

class Color{
public:
	Color(COLORREF color = 0);
	Color(UINT red, UINT green, UINT blue);
	Color& Set(COLORREF color);
	Color& Set(UINT r, UINT g, UINT b);
	UINT GetRed() const;
	UINT GetGreen() const;
	UINT GetBlue() const;
	COLORREF AsColorRef() const;
	Color& operator=(COLORREF color);
	operator COLORREF();
	static unsigned int ValueOfHex(char ch) ;
	Color& Set(const char *val);
	static unsigned int ValueOfHex(const wchar_t ch);
	Color& Set(const wchar_t *val);
private:
	COLORREF color_;
};

class Dc{
public:
	Dc(HDC dc);
	virtual ~Dc();
public:
	HDC GetDC() const;
	operator HDC();
public:
	BOOL Rectangle(int left, int top, int right, int bottom) const;
	BOOL Rectangle(const Rect& rect) const;
	BOOL RoundRect(int left, int top, int right, int bottom, int width, int height)const ;
	BOOL RoundRect(const Rect& rect, int width, int height)const ;
protected:
	HDC dc_;
};




class Wnd{
public:
	Wnd(HWND w = 0);
public:
	Rect GetWindowRect();
	Rect GetClientRect();
	BOOL ShowWindow(int cmdShow);
	BOOL UpdateWindow();
	HWND SetFocus();
	BOOL DestroyWindow();
	BOOL MoveWindow(int x, int y, int w, int h, BOOL repaint);
public:
	HWND GetWnd();
	void SetWnd(HWND hwnd);
	operator HWND();
private:
	HWND m_Wnd;
};


